package com.shitou.shitoucommons.utils;

/**
 * class detail:
 *      用以得到用户相应的等级
 * @author 石头人
 */
@SuppressWarnings("all")
public class MemberLevelCountUtils {

    //等级需要的成长值1/100/1000/5000/10000/50000/100000/200000
    public static String lvelCount(Integer growth){
        if ( growth >= 1 && growth <= 100 ){
            return "VIP-1";
        }else if ( growth > 100 && growth <= 1000 ){
            return "VIP-2";
        }else if ( growth > 1000 && growth <= 10000 ){
            return "VIP-3";
        }else if ( growth > 10000 && growth <= 50000 ){
            return "VIP-4";
        }else if ( growth > 50000 && growth <= 100000 ){
            return "VIP-5";
        }else if ( growth > 100000 && growth <= 200000 ){
            return "VIP-6";
        }else if ( growth > 200000 ){
            return "VIP-7";
        }else {
            return "VIP-1";
        }
    }

    /**
     * 通过level等级计得到会员备注
     * @param level
     * @return
     */
    public static String levelNote(Integer growth){
        if ( growth >= 1 && growth <= 100 ){
            return "当前您的会员等级为: VIP-1 | 没有特权哦";
        }else if ( growth > 100 && growth <= 1000 ){
            return "当前您的会员等级为: VIP-2 | 没有特权哦";
        }else if ( growth > 1000 && growth <= 10000 ){
            return "当前您的会员等级为: VIP-3 | 没有特权哦";
        }else if ( growth > 10000 && growth <= 50000 ){
            return "当前您的会员等级为: VIP-4 | 没有特权哦";
        }else if ( growth > 50000 && growth <= 100000 ){
            return "当前您的会员等级为: VIP-5 | 没有特权哦";
        }else if ( growth > 100000 && growth <= 200000 ){
            return "V当前您的会员等级为: VIP-6 | 拥有一次免单特权 金额小于等于100";
        }else if ( growth > 200000 ){
            return "V当前您的会员等级为: VIP-7 | 拥有一次免单特权 金额小于等于1000";
        }else {
            return "当前您的会员等级为: VIP-1 | 没有特权哦";
        }
    }

    /**
     * 评论获取的成长值
     * 1/1/1/2/3/4/5/8
     */
    public static Integer commentGrowthPoint(Integer growth){
        if ( growth >= 1 && growth <= 100 ){
            return 1;
        }else if ( growth > 100 && growth <= 1000 ){
            return 1;
        }else if ( growth > 1000 && growth <= 10000 ){
            return 2;
        }else if ( growth > 10000 && growth <= 50000 ){
            return 4;
        }else if ( growth > 50000 && growth <= 100000 ){
            return 5;
        }else if ( growth > 100000 && growth <= 200000 ){
            return 8;
        }else if ( growth > 200000 ){
            return 10;
        }else {
            return 1;
        }
    }

    /**
     * 免单
     * @param integer
     * @return
     */
    public static Integer freeFreight(Integer integer){
        if( integer >= 100000 ){
            return 1;
        }
        return 0;
    }


    public static void main(String[] args) {
        System.out.println((1010));
    }
}
